import request from '@/utils/request'
// 查询部门列表
export function getDpmList(){
  return request({
    // method:'get',
    url:'/company/department'
  })
}
// 删除部门
export function delDpmList(id) {
  return request({
    method: 'delete',
    url: `/company/department/${id}`
  })
}

/**
 *  新增部门接口
 *
 * ****/
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
/** *
 * 获取部门详情
 * ***/
export function getDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}

// id修改部门详情接口
export function updateDepartment(data) {
  return request({
    method:'PUT',
    url:`/company/department/${data.id}`,
    data
  })
}
